package pfc.pfcjoc.core;

public class GameLogic {
  private GameState currentGameState;


  public GameLogic() {
    currentGameState = MenuGameState.getInstance();
    currentGameState.setContext(this);
    currentGameState.onEnteringMode();
  }


  public void setCurrentGameState(GameState state) {
    currentGameState.onLeavingMode();
    currentGameState = state;
    currentGameState.onEnteringMode();
  }


  public void paint(float alpha) {
    currentGameState.paint(alpha);
  }


  public void update(float delta) {
    currentGameState.update(delta);
  }
}
